#ifndef __HOBJ_CAMERA__
#define __HOBJ_CAMERA__
#include "hikari.h"
#include "HObj.h"

class HObjCamera:public HObj{
private:
	ISceneNode*target;
public:
	HObjCamera(ICameraSceneNode*camera):HObj(camera){
	target=NULL;	
	}
	
	void setTarget(ISceneNode*target){
		this->target=target;
	}

	void targetCamera(){
		ICameraSceneNode*camera=(ICameraSceneNode*)node;
		camera->updateAbsolutePosition();
		if(target!=NULL){
			target->updateAbsolutePosition();
			camera->setTarget(target->getAbsolutePosition());
		}
	}
};

#endif